
QT       += core gui webenginewidgets sql

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG += c++17

DEFINES += USE_ADBLOCK

# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
    browserview.cpp \
    downloadSources/downloadcontrollercpp/downloaditemcontroller.cpp \
    downloadSources/downloadviewcpp/downloaditemwidget.cpp \
    downloadSources/downloadviewcpp/downloadmanagerwidget.cpp \
    downloadSources/downloadviewcpp/historywidget.cpp \
    downloadSources/downloadviewcpp/historyitemwidget.cpp \
    downloadSources/downloadmodelcpp/historyitemmodel.cpp \
    historyrecord.cpp \
    main.cpp \
    popwidget.cpp \
    settingwidget.cpp \
    star.cpp \
    star_net.cpp \
    tabwidget.cpp \
    login.cpp \
    main.cpp \
    register.cpp \
    tabwidget.cpp \
    tools/requestinterceptor.cpp \
    tools/uawidget.cpp \
    userconf.cpp \
    webpage.cpp \
    webpopupwindow.cpp \
    webview.cpp

contains(DEFINES, USE_ADBLOCK) {
        SOURCES += third_party/ad-block/ad_block_client.cc \
                third_party/ad-block/no_fingerprint_domain.cc \
                third_party/ad-block/filter.cc \
                third_party/ad-block/protocol.cc \
                third_party/ad-block/context_domain.cc \
                third_party/ad-block/cosmetic_filter.cc \
                third_party/bloom-filter-cpp/BloomFilter.cpp \
                third_party/hashset-cpp/hash_set.cc \
                third_party/hashset-cpp/hashFn.cc

        HEADERS = third_party/ad-block/ad_block_client.h
}

HEADERS += \
    browserview.h \
    downloadHeaders/downloadcontrollerh/downloaditemcontroller.h \
    downloadHeaders/downloadmodelh/connection.h \
    downloadHeaders/downloadviewh/downloaditemwidget.h \
    downloadHeaders/downloadviewh/downloadmanagerwidget.h \
    downloadHeaders/downloadviewh/historywidget.h \
    downloadHeaders/downloadviewh/historyitemwidget.h \
    downloadHeaders/downloadmodelh/historyitemmodel.h \
    historyrecord.h \
    popwidget.h \
    settingwidget.h \
    star.h \
    star_net.h \
    tabwidget.h \
    login.h \
    register.h \
    tabwidget.h \
    tools/requestinterceptor.h \
    tools/uawidget.h \
    userconf.h \
    webpage.h \
    webpopupwindow.h \
    webview.h

FORMS += \
    browserview.ui \
    downloadUI/downloaditemwidget.ui \
    downloadUI/downloadmanagerwidget.ui \
    downloadUI/historywidget.ui \
    downloadUI/historyitemwidget.ui \
    historyrecord.ui \
    login.ui \
    popwidget.ui \
    register.ui \
    settingwidget.ui \
    star_net.ui \
    userconf.ui

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

RESOURCES += \
    res.qrc

DISTFILES += \
    resource/imgs/add_to_favorites_52px.png
